const fs = require('fs')
const path = require('path')
function read() {
  return new Promise((resolve, reject) => {
    fs.readFile(__dirname + '/cp.txt', 'utf-8', (err, data) => {
      if (err) {
        reject(err)
      } else {
        resolve(data)
      }
    })
  })
}

async function ward() {
  let text = await read()
  text = text.replace(/\`/g, '_g_')
  text = text.replace(/\${/g, '_a_')
  const textby = fs.writeFile(
    path.resolve(__dirname, './cp.md'),
    text,
    () => {
      console.log('ok')
    }
  )
}
ward()
